<template>
  <div class="app-container">
    <!-- 头部 -->
    <div class="ProductionDynamicHeader">
      <Find :OriginalFilter="{ static: true }" :formList="formList" @findClicked="findClicked" />
    </div>

    <!-- 左侧 -->
    <div class="Main mt10">
      <el-card shadow="never" :body-style="{ padding: '10px 10px 0px' }">
        <div slot="header" class="mb9 f16">
          <span style="font-weight: 600">指令明细</span>
          <el-button class="ml10" type="primary" size="default" style="background-color: aquamarine" @click="getTableList(3)">根据指令排序</el-button>
        </div>
        <Table
          :tableData="tableData"
          :tableHeader="tableHeader"
          :selection="true"
          :TableHeight="50"
          :outTableHeight="130"
          :summaryData="summaryData"
          summary
          @currentRow="currentRow"
          :isLoading="isLoading"
        />
      </el-card>

      <!-- 右侧 -->
      <el-card shadow="always" :body-style="{ padding: '10px 10px 10px' }">
        <div class="flex">
          <el-select v-model="value" filterable placeholder="PO号码明细">
            <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
          </el-select>
          <div class="ml15 flex" v-if="value === 0">
            <span class="f14" style="width: 80px; line-height: 32px">测试样</span>
            <el-input placeholder="" clearable @change="" disabled></el-input>
          </div>
          <div class="ml15 flex" v-if="value === 0">
            <span class="f14" style="width: 80px; line-height: 32px">拉力样</span>
            <el-input placeholder="" clearable @change="" disabled></el-input>
          </div>
          <div class="ml15 flex" v-if="value === 0">
            <span class="f14" style="width: 80px; line-height: 32px">船头样</span>
            <el-input placeholder="" clearable @change="" disabled></el-input>
          </div>
        </div>

        <!-- PO号码明细 -->
        <div v-if="value === 0">
          <Table :tableHeader="tableHeader4" :tableData="tableData4" :TableHeight="11" :outTableHeight="180" />
          <el-card shadow="never" :body-style="{ padding: '10px 10px 0px' }">
            <div slot="header" class="f16">
              <span style="font-weight: 600">指令配码明细</span>
            </div>
            <Table :tableHeader="tableHeader41" :tableData="tableData41" :TableHeight="39" :outTableHeight="180" />
          </el-card>
        </div>
        <!-- 指令用量明细 -->
        <div class="mt15" v-if="value === 1">
          <Table :tableHeader="tableHeader5" :tableData="tableData5" :TableHeight="50" :outTableHeight="140" />
        </div>
        <!-- 配色注意事项 -->
        <div class="mt15" v-if="value === 2">
          <Table :tableHeader="tableHeader6" :tableData="tableData6" :TableHeight="50" :outTableHeight="140" />
        </div>
        <!-- 型体配宣明细 -->
        <div class="mt15" v-if="value === 3">
          <Table :tableHeader="tableHeader7" :tableData="tableData7" :TableHeight="50" :outTableHeight="140" />
        </div>
        <!-- 配色BOM资料 -->
        <div class="mt15" v-if="value === 4">
          <Table :tableHeader="tableHeader8" :tableData="tableData8" :TableHeight="50" :outTableHeight="140" />
        </div>
        <!-- 各节点生产明细 -->
        <div class="mt15 flex" v-if="value === 5">
          <Table :tableHeader="tableHeader9" :tableData="tableData9" class="mr55" :TableHeight="50" :outTableHeight="140" />
          <Table :tableHeader="tableHeader9" :tableData="tableData9" class="mr55" :TableHeight="50" :outTableHeight="140" />
          <Table :tableHeader="tableHeader9" :tableData="tableData9" class="mr55" :TableHeight="50" :outTableHeight="140" />
          <Table :tableHeader="tableHeader9" :tableData="tableData9" :TableHeight="50" :outTableHeight="140" />
        </div>
        <PageModule :PageData="{ total }" @pageSizeChange="handleSizeChange" @pageChange="handleCurrentChange" />
      </el-card>
    </div>
  </div>
</template>
<script lang="ts">
import { defineComponent } from 'vue'
import 'dayjs/locale/zh-cn'
import { ElMessage } from 'element-plus'
import service from '@/utils/request'
import fileRequest from '@/utils/fileRequest'
import JMessage from '@/utils/JMessage'
export default defineComponent({
  name: 'CommandDataQueryKa'
})
</script>
<script lang="ts" setup>
import { i18n, Jzhcn } from '@/i18n'
import { onMounted, reactive, ref, watch } from 'vue'
const currentLotNo = ref('')
// 表一模块

const formList = ref<any>([
  {
    type: 'input',
    inputPlaceholder: '请输入指令',
    inputValue: ''
  },
  {
    type: 'select',
    selectValue: '',
    selectP: '工厂型体',
    selectLabel: '',
    selectOptions: []
  },
  {
    type: 'select',
    selectValue: '',
    selectLabel: '',
    selectP: '新旧型体',
    selectOptions: [
      {
        optionValue: '新款',
        optionLabel: '新款'
      },
      {
        optionValue: '旧款',
        optionLabel: '旧款'
      }
    ]
  },
  {
    type: 'select',
    selectValue: '',
    selectP: '颜色代码',
    selectLabel: '',
    selectOptions: []
  },
  {
    type: 'select',
    selectValue: '',
    selectP: '颜色名称',
    selectLabel: '',
    selectOptions: []
  },
  {
    type: 'select',
    selectValue: '',
    selectP: '品牌',
    selectLabel: '',
    selectOptions: []
  },
  {
    type: 'date',
    dateLabel: '下单日期',
    dateValue: ''
  },
  {
    type: 'date',
    dateLabel: '客人交期',
    dateValue: ''
  },
  {
    type: 'input',
    inputPlaceholder: '请输入合同号',
    inputValue: ''
  },
  {
    type: 'input',
    inputPlaceholder: '请输入客人货号',
    inputValue: ''
  },
  {
    type: 'select',
    selectValue: '',
    selectP: '冲刀',
    selectLabel: '',
    selectOptions: []
  },
  {
    type: 'select',
    selectValue: '',
    selectP: '楦头',
    selectLabel: '',
    selectOptions: []
  },
  {
    type: 'select',
    selectValue: '',
    selectP: '底模',
    selectLabel: '',
    selectOptions: []
  },
  {
    type: 'select',
    selectValue: '',
    selectP: '大底厂商',
    selectLabel: '',
    selectOptions: []
  },
  {
    type: 'select',
    selectValue: '',
    selectP: '季度',
    selectLabel: '',
    selectOptions: []
  },
  {
    type: 'button',
    checkboxLabel: '置空',
    bgColor: '#1890FF'
  },
  {
    type: 'button',
    checkboxLabel: '导出当前行指令单'
  },
  {
    type: 'button',
    checkboxLabel: '导出'
  }
])
// '置空'按钮
const findClicked = async (content: string) => {
  if (content === '置空') {
    formList.value.forEach((item: any) => {
      item.inputValue = ''
      item.selectValue = ''
      item.dateValue = ''
    })
    getTableList()
  }
  if (content === '导出当前行指令单') {
    const res = (await fileRequest.post(`/style/ExportInstructionSheet`, {
      lotNo: currentTableRow.value.lotNo
    })) as any
    const link = document.createElement('a') // 利用a标签自定义下载文件名
    let blob = new Blob([res.data]) // 创建Blob对象，设置文件类型
    link.style.display = 'none'
    //设置连接
    link.href = window.URL.createObjectURL(blob)
    const FileName = decodeURI(res.headers['content-disposition'].split(`filename=`)[1])
    link.download = FileName //自定义文件名字
    document.body.appendChild(link)
    //模拟点击事件
    link.click()
    document.body.removeChild(link)
  }
}
const tableData = ref<any>([])
const imgList = ref([])
const tableHeader = ref([
  {
    type: 'img',
    label: '图片',
    fixed: true,
    prop: 'photoPath',
    srcList: imgList
  },
  {
    label: '指令',
    prop: 'lotNo',
    width: 100
  },
  {
    label: '订单数',
    prop: 'orderQty',
    width: 80
  },
  {
    label: '预补数',
    prop: 'surplusQty',
    width: 60
  },
  {
    label: '工厂型体',
    prop: 'style'
  },
  {
    label: '新旧型体',
    prop: 'styleType'
  },
  {
    label: '颜色代码',
    prop: 'colorCode'
  },
  {
    label: '颜色',
    prop: 'color'
  },
  {
    label: '制单人',
    prop: 'userId'
  },
  {
    label: '中间码',
    prop: 'mSize'
  },
  {
    label: '品牌',
    prop: 'custom'
  },
  {
    label: '客人货号',
    prop: 'developmentNo'
  },
  {
    label: '合同号',
    prop: 'customPo'
  },
  {
    label: '客人交期',
    prop: 'deliveryDate'
  },
  {
    label: '制单日期',
    prop: 'sysDate'
  },
  {
    label: '基本码',
    prop: 'baseSize'
  },
  {
    label: '冲刀号',
    prop: 'cutNo'
  },
  {
    label: '底模号',
    prop: 'moldNo'
  },
  {
    label: '大底厂商',
    prop: 'soleVendor'
  },
  {
    label: '楦头',
    prop: 'lastNo'
  },
  {
    label: '下单日期',
    prop: 'orderDate'
  },
  {
    label: '季度',
    prop: 'season'
  },
  {
    label: '生成日期',
    prop: 'generateDate'
  },
  {
    label: '生成状态',
    prop: 'generateFlag'
  },
  {
    label: '检核日期',
    prop: 'cfmDate'
  },
  {
    label: '检核状态',
    prop: 'cfmFlag'
  },
  {
    label: '审核日期',
    prop: 'checkDate'
  },
  {
    label: '备注',
    prop: 'lotRemark'
  },
  {
    type: 'checkbox',
    label: '全套',
    prop: 'processAll'
  },
  {
    type: 'checkbox',
    label: '主面料',
    prop: 'processUpper'
  },
  {
    type: 'checkbox',
    label: '冲裁',
    prop: 'processCut01'
  },
  {
    type: 'checkbox',
    label: '工艺',
    prop: 'processCut02'
  },
  {
    type: 'checkbox',
    label: '配套',
    prop: 'processCut03'
  },
  {
    type: 'checkbox',
    label: '针车',
    prop: 'processStitch'
  },
  {
    type: 'checkbox',
    label: '大底',
    prop: 'processSole'
  },
  {
    type: 'checkbox',
    label: '成型',
    prop: 'processLast'
  },
  {
    type: 'checkbox',
    label: '外发',
    prop: 'outFlag'
  }
])
// 总计
interface summaryDataType {
  index: number
  num: number | undefined
}
const summaryData = ref<summaryDataType[]>([
  {
    index: 3,
    num: 0
  },
  {
    index: 4,
    num: 0
  }
])
// 分页器
const currentPage = ref(1)
const pageSize = ref(40)
const total = ref(0)
const handleSizeChange = (val: number) => {
  pageSize.value = val
  getTableList()
}
const handleCurrentChange = (val: number) => {
  currentPage.value = val
  getTableList()
}
const isLoading = ref(true)
// 获取表数据
const getTableList = async (status: any = null) => {
  isLoading.value = true
  let tableDataList = await service.post<any, any>('/style/getStyleData', {
    color: formList.value.find((item: any) => item.selectP && Jzhcn.Find[item.selectP.split('.')[1] as keyof typeof Jzhcn.Find] === '颜色名称')
      ?.selectValue, //	颜色名称
    colorCode: formList.value.find((item: any) => item.selectP && Jzhcn.Find[item.selectP.split('.')[1] as keyof typeof Jzhcn.Find] === '颜色代码')
      ?.selectValue, //	颜色代码
    custom: formList.value.find((item: any) => item.selectP && Jzhcn.Find[item.selectP.split('.')[1] as keyof typeof Jzhcn.Find] === '品牌')
      ?.selectValue, //	品牌
    customPo: formList.value.find(
      (item: any) => item.inputPlaceholder && Jzhcn.Find[item.inputPlaceholder.split('.')[1] as keyof typeof Jzhcn.Find] === '请输入合同号'
    )?.inputValue, //	合同号
    cutNo: formList.value.find((item: any) => item.selectP && Jzhcn.Find[item.selectP.split('.')[1] as keyof typeof Jzhcn.Find] === '冲刀')
      ?.selectValue, //	冲刀
    deliveryEndDate: formList.value.find(
      (item: any) => item.dateLabel && Jzhcn.Find[item.dateLabel.split('.')[1] as keyof typeof Jzhcn.Find] === '客人交期'
    )?.dateValue?.[1], //	交期日期结束
    deliveryStartDate: formList.value.find(
      (item: any) => item.dateLabel && Jzhcn.Find[item.dateLabel.split('.')[1] as keyof typeof Jzhcn.Find] === '客人交期'
    )?.dateValue?.[0], //	交期日期开始
    developmentNo: formList.value.find(
      (item: any) => item.inputPlaceholder && Jzhcn.Find[item.inputPlaceholder.split('.')[1] as keyof typeof Jzhcn.Find] === '请输入客人货号'
    )?.inputValue, //	客人货号
    lastNo: formList.value.find((item: any) => item.selectP && Jzhcn.Find[item.selectP.split('.')[1] as keyof typeof Jzhcn.Find] === '楦头')
      ?.selectValue, //	楦头
    lotNo: formList.value.find(
      (item: any) => item.inputPlaceholder && Jzhcn.Find[item.inputPlaceholder.split('.')[1] as keyof typeof Jzhcn.Find] === '请输入指令'
    )?.inputValue, //	指令
    moldNo: formList.value.find((item: any) => item.selectP && Jzhcn.Find[item.selectP.split('.')[1] as keyof typeof Jzhcn.Find] === '底模')
      ?.selectValue, //	底模
    orderEndDate: formList.value.find(
      (item: any) => item.dateLabel && Jzhcn.Find[item.dateLabel.split('.')[1] as keyof typeof Jzhcn.Find] === '下单日期'
    )?.dateValue?.[1], //	下单日期结束
    orderStartDate: formList.value.find(
      (item: any) => item.dateLabel && Jzhcn.Find[item.dateLabel.split('.')[1] as keyof typeof Jzhcn.Find] === '下单日期'
    )?.dateValue?.[0], //	下单日期开始
    pageNum: currentPage.value, //		intege
    pageSize: pageSize.value, //		intege
    reason: formList.value.find((item: any) => item.selectP && Jzhcn.Find[item.selectP.split('.')[1] as keyof typeof Jzhcn.Find] === '季度')
      ?.selectValue, //	季度
    soleVendor: formList.value.find((item: any) => item.selectP && Jzhcn.Find[item.selectP.split('.')[1] as keyof typeof Jzhcn.Find] === '大底厂商')
      ?.selectValue, //	大底厂商
    style: formList.value.find((item: any) => item.selectP && Jzhcn.Find[item.selectP.split('.')[1] as keyof typeof Jzhcn.Find] === '工厂型体')
      ?.selectValue, //	型体
    styleType: formList.value.find((item: any) => item.selectP && Jzhcn.Find[item.selectP.split('.')[1] as keyof typeof Jzhcn.Find] === '新旧型体')
      ?.selectValue, //	新旧型体
    status //	状态
  })
  isLoading.value = false

  imgList.value = tableDataList.styleDetails.map((item: any) => {
    return item.photoPath
  })
  tableDataList.styleDetails.forEach((item: any) => {
    item.processAll === 'Y' ? (item.processAll = true) : (item.processAll = false)
    item.processUpper === 'Y' ? (item.processUpper = true) : (item.processUpper = false)
    item.processCut01 === 'Y' ? (item.processCut01 = true) : (item.processCut01 = false)
    item.processCut02 === 'Y' ? (item.processCut02 = true) : (item.processCut02 = false)
    item.processCut03 === 'Y' ? (item.processCut03 = true) : (item.processCut03 = false)
    item.processStitch === 'Y' ? (item.processStitch = true) : (item.processStitch = false)
    item.processSole === 'Y' ? (item.processSole = true) : (item.processSole = false)
    item.processLast === 'Y' ? (item.processLast = true) : (item.processLast = false)
    item.outFlag === 'Y' ? (item.outFlag = true) : (item.outFlag = false)
  })
  tableData.value = tableDataList.styleDetails
  total.value = tableDataList.total
  currentRow()
  summaryData.value[0].num = tableDataList.orderCount
  summaryData.value[1].num = tableDataList.surplusCount
}

onMounted(() => {
  getTableList()
})
watch(
  () =>
    formList.value.map((item: any) => {
      item.selectValue, item.inputValue, item.dateValue, item.checked
    }),
  () => {
    getTableList()
  }
)

const value = ref(0)
const options = [
  {
    value: 0,
    label: 'PO号码明细'
  },
  {
    value: 1,
    label: '指令用量明细'
  },
  {
    value: 2,
    label: '配色注意事项'
  },
  {
    value: 3,
    label: '型体配楦明细'
  },
  {
    value: 4,
    label: '配色BOM明细'
  },
  {
    value: 5,
    label: '各节点明细'
  }
]

const tableHeader4 = ref([
  {
    label: '配码',
    prop: 'groupNo'
  },
  {
    label: 'PO',
    prop: 'poNo'
  },
  {
    label: '装箱方式',
    prop: 'caseType'
  },
  {
    label: '数量',
    prop: 'count'
  },
  {
    label: '码制',
    prop: 'sizeNotice'
  }
])
const tableHeader41 = ref([
  {
    label: '号码',
    prop: 'sizeNo'
  },
  {
    label: '订单数',
    prop: 'orderQty'
  },
  {
    label: '预补数',
    prop: 'surplusQty'
  }
])
const tableData41 = ref([])
const tableData4 = ref([])

const tableHeader5 = ref([
  {
    label: '序号',
    prop: 'seqNo',
    width: 50
  },
  {
    label: '部位',
    prop: 'partName'
  },
  {
    label: '物料编号',
    prop: 'mtlNo',
    width: 120
  },
  {
    label: '段',
    prop: 'segment',
    width: 50
  },
  {
    label: '分类',
    prop: 'mtlTypeNo'
  },
  {
    label: '分类名称',
    prop: 'typeName'
  },
  {
    label: '材料颜色',
    prop: 'mtlColor'
  },
  {
    label: '材料名称',
    prop: 'mtlName',
    width: 200
  },
  {
    label: '规格',
    prop: 'mtlSpec'
  },
  {
    label: '单位',
    prop: 'mtlUnit'
  },
  {
    label: '尺码起',
    prop: 'size1'
  },
  {
    label: '尺码止',
    prop: 'size2'
  },
  {
    label: '单耗',
    prop: 'stdUsage'
  },
  {
    label: '用量',
    prop: 'ttlUsage'
  },
  {
    label: '预加量',
    prop: 'addUsage'
  },
  {
    label: '比例%',
    prop: 'proportion'
  },
  {
    label: '备注',
    prop: 'remark'
  }
])
const tableData5 = ref([])

const tableHeader6 = ref([
  {
    label: '序号',
    prop: 'seqNo',
    width: 50
  },
  {
    label: '事项名称',
    prop: 'prodMemo'
  },
  {
    label: '生产注意事项',
    prop: 'seqName',
    width: 150
  }
])
const tableData6 = ref([])

const tableHeader7 = ref([
  {
    label: '鞋码',
    prop: 'sizeNo'
  },
  {
    label: '冲刀',
    prop: 'cutSize'
  },
  {
    label: '楦头',
    prop: 'lastSize'
  },
  {
    label: '大底',
    prop: 'soleSize'
  },
  {
    label: '中底',
    prop: 'test'
  }
])
const tableData7 = ref([])

const tableHeader8 = ref([
  {
    label: '序号',
    prop: 'seqNo'
  },
  {
    label: '部位',
    prop: 'partName'
  },
  {
    label: '分段',
    prop: 'segment'
  },
  {
    label: '片数',
    prop: 'typeName'
  },
  {
    label: '分类名称',
    prop: 'typeName'
  },
  {
    label: '物料编码',
    prop: 'mtlNo'
  },
  {
    label: '材料颜色',
    prop: 'mtlColor'
  },
  {
    label: '材料名称',
    prop: 'mtlName'
  },
  {
    label: '规格',
    prop: 'mtlSpec'
  },
  {
    label: '单位',
    prop: 'mtlUnit'
  },
  {
    label: '尺码起',
    prop: 'size1'
  },
  {
    label: '尺码止',
    prop: 'size2'
  },
  {
    label: '用量',
    prop: 'usage'
  },
  {
    label: '计算方式',
    prop: 'usageType'
  },
  {
    label: '领用部门',
    prop: 'drawDept'
  },
  {
    label: '捡料',
    prop: 'test'
  },
  {
    label: '主辅料',
    prop: 'mtlProperty'
  },
  {
    label: '备注',
    prop: 'remark'
  }
])
const tableData8 = ref([])

const tableHeader9 = ref([
  {
    label: '号码',
    prop: 'test'
  },
  {
    label: '订单数',
    prop: 'test'
  },
  {
    label: '预补数',
    prop: 'test'
  }
])
const tableData9 = ref([])
const currentTableRow = ref({}) as any
// 点击表给另一张表传数据
const currentRow = async (row: any = tableData.value[0] ? tableData.value[0] : {}) => {
  currentTableRow.value = row
  let { lotNo, color, style }: any = row
  // 给表二传指令号
  let table5Data = await service.get('/style/getUsageDetails', {
    params: { lotNo }
  })
  tableData5.value = table5Data as any

  let table4Data = await service.get<any, any>('/style/getPoNumberDetails', {
    params: { lotNo }
  })
  tableHeader4.value = [
    { label: '配码', prop: 'groupNo' },
    { label: 'PO', prop: 'poNo' },
    { label: '装箱方式', prop: 'caseType' },
    { label: '数量', prop: 'count' },
    { label: '码制', prop: 'sizeNotice' }
  ]
  table4Data.size.forEach((item: any, index: number) => {
    Object.keys(table4Data.pcLotGroups[0])
      .slice(6)
      .forEach((pcLotGroupItem: any, pcLotGroupIndex: number) => {
        if (pcLotGroupIndex === index) {
          tableHeader4.value.push({
            label: item,
            prop: pcLotGroupItem
          })
        }
      })
  })
  tableData4.value = table4Data.pcLotGroups
  tableData41.value = table4Data.codeDetails

  // 配色注意事项
  tableData6.value = await service.post<any, any>('/style/getColorPrecautions', { color, style })
  // 型体配楦明细
  tableData7.value = await service.get<any, any>('/style/getStyleToLastNoDetails', {
    params: { style }
  })
  // 配色BOM明细
  tableData8.value = await service.post<any, any>('/style/getColorBOMInfo', { color, style })
  // 各节点明细
}

const selectList = async () => {
  let { style, colorCode, styleColor, custom, cutNo, laseNo, moldNo, soleVendor, season } = await service.get<any, any>('/style/getCondition')
  if (style && colorCode && styleColor && custom && cutNo && laseNo && moldNo && soleVendor && season) {
    style.forEach((item: any) => {
      if (item === null) return
      formList.value
        .find((item: any) => item.type === 'select' && Jzhcn.Find[item.selectP.split('.')[1] as keyof typeof Jzhcn.Find] === '工厂型体')
        .selectOptions.push({
          optionValue: item,
          optionLabel: item
        })
    })
    colorCode.forEach((item: any) => {
      if (item === null) return
      formList.value
        .find((item: any) => item.type === 'select' && Jzhcn.Find[item.selectP.split('.')[1] as keyof typeof Jzhcn.Find] === '颜色代码')
        .selectOptions.push({
          optionValue: item,
          optionLabel: item
        })
    })
    styleColor.forEach((item: any) => {
      if (item === null) return
      formList.value
        .find((item: any) => item.type === 'select' && Jzhcn.Find[item.selectP.split('.')[1] as keyof typeof Jzhcn.Find] === '颜色名称')
        .selectOptions.push({
          optionValue: item,
          optionLabel: item
        })
    })
    custom.forEach((item: any) => {
      if (item === null) return
      formList.value
        .find((item: any) => item.type === 'select' && Jzhcn.Find[item.selectP.split('.')[1] as keyof typeof Jzhcn.Find] === '品牌')
        .selectOptions.push({
          optionValue: item,
          optionLabel: item
        })
    })
    cutNo.forEach((item: any) => {
      if (item === null) return
      formList.value
        .find((item: any) => item.type === 'select' && Jzhcn.Find[item.selectP.split('.')[1] as keyof typeof Jzhcn.Find] === '冲刀')
        .selectOptions.push({
          optionValue: item,
          optionLabel: item
        })
    })
    laseNo.forEach((item: any) => {
      if (item === null) return
      formList.value
        .find((item: any) => item.type === 'select' && Jzhcn.Find[item.selectP.split('.')[1] as keyof typeof Jzhcn.Find] === '楦头')
        .selectOptions.push({
          optionValue: item,
          optionLabel: item
        })
    })
    moldNo.forEach((item: any) => {
      if (item === null) return
      formList.value
        .find((item: any) => item.type === 'select' && Jzhcn.Find[item.selectP.split('.')[1] as keyof typeof Jzhcn.Find] === '底模')
        .selectOptions.push({
          optionValue: item,
          optionLabel: item
        })
    })
    soleVendor.forEach((item: any) => {
      if (item === null) return
      formList.value
        .find((item: any) => item.type === 'select' && Jzhcn.Find[item.selectP.split('.')[1] as keyof typeof Jzhcn.Find] === '大底厂商')
        .selectOptions.push({
          optionValue: item,
          optionLabel: item
        })
    })
    season.forEach((item: any) => {
      if (item === null) return
      formList.value
        .find((item: any) => item.type === 'select' && Jzhcn.Find[item.selectP.split('.')[1] as keyof typeof Jzhcn.Find] === '季度')
        .selectOptions.push({
          optionValue: item,
          optionLabel: item
        })
    })
  }
}
onMounted(() => {
  selectList()
})
</script>

<style lang="less" scoped>
.btns {
  display: flex;
  justify-content: end;
  margin: 10px 20px 0px;

  .bg {
    background-color: #e7e7e7;
    border: 1px solid #e7e7e7;
    color: #000000;
  }
}

.top {
  :deep(.el-input) {
    height: 25px;
    color: red;
    width: 80px !important;
  }

  :deep(.el-form-item__label) {
    width: 65px;
    justify-content: start;
    padding: 0;
  }

  :deep(.right) {
    .el-form {
      flex-wrap: wrap;
      width: 290px;

      .el-form-item {
        justify-content: space-between;
        width: 60px;
        margin-top: 30px;
        margin-right: 20px !important;
      }
    }
  }
}

.main {
  :deep(.el-form-item:first-child) {
    width: 350px;

    .el-input__inner {
      width: 300px;
    }
  }

  :deep(.w-50) {
    width: 100px !important;
  }

  :deep(.el-form-item__content) {
    margin-right: 40px !important;
  }
}

.MainLeftCard {
  position: relative;
  margin-left: 10px;
}

// 表格内容居中
:deep(.el-table .cell.el-tooltip) {
  min-width: auto;
}
</style>
